Due to the intensive computational features that are implemented in a computer system, the precision of the numbers used in the computations play a very important role in the success of the calculation process. Two common operand formats as established by the IEEE are known as single precision data and double precision data formats. As established by the IEEE P754 binary floating point arithmetic standard, single precision floating point data comprises a mantissa portion, an exponent portion and a sign bit portion. The mantissa portion represents a fraction F and is defined as comprising twenty-three bits plus an implied "1" bit (known as a hidden bit) for a total of twenty-four mantissa bits. The mantissa is thus represented as a value "1.F". The exponential portion in the single precision format comprises eight bits. Double precision floating point data also comprises a mantissa portion, an exponent portion and a sign bit portion. The mantissa portion of double precision data is defined as comprising fifty-two bits plus an implied "1" bit for a total of fifty-three bits. The exponential portion comprises eleven bits. Both data formats have a single bit for the sign bit and both data formats have a predetermined number of allocated bits of precision which are finite in nature. If the resolution (number of bits) of a number exceeds fifty-three bits, precision is usually lost using this format.
Furthermore, the maximum precision of numerical types on computer systems is typically the machine word size. Thus, numerical values that exceed the allocated number of bits in a machine word size will be forced to lose bits of precision. Also, certain arithmetic functions will lose bits of precision if the arithmetic functions require more precision than offered by the host computer's word size. For example, when emulating an IEEE-compliant floating point unit or when emulating certain other arithmetic instructions in a microprocessor, one ideally needs to have potentially infinite precision with regard to arithmetic operations in order to achieve 100% accurate results. In addition, if a first floating point number having M significant bits of mantissa is multiplied by a second floating point number having N significant bits of mantissa, a resulting fully-precise mantissa value may have N*M bits of significance. If the N*M bits is larger than a number of bits allocated to the mantissa, then significance is lost/truncated by the system to allow the new mantissa to fit into the appropriately allocated size. In addition, if a very small number is added to a very big number and truncation is forced to occur, the affect of the very small number on the very big number may be lost via the truncation as if the addition never occurred.
As known in the art, implementing infinite precision arithmetic requires extensive use of a memory allocator, resulting in a large overhead which results in slower numerical operations. Due to the difficulty involved in creating a system to perform infinite precision arithmetic, no efficient and useful infinite precision system has been created.
A conventional method called LISP "bignums" requires extensive use of the memory allocator to implement arithmetic computations, for there is no lazy allocation methods or computation documented for performing infinite precision arithmetic in LISP. Furthermore, LISP "bignums" lack special operation for floating point math emulation, which are very essential for performing infinite precision floating point operations.
A "big number package" from GNU g++ compiler also suffers from the same deficiencies found in the previous discussed conventional method referred to as Lisp "bignums". The "big number package" from GNU g++ compiler also requires extensive and wasteful use of a memory allocator, has no "lazy" memory allocation method or computation from inspection of code, and has no special operators for floating point math emulation.
The last known method is a mathematical processing program called dc, which operates under the UNIX environment. The dc program does not support true arbitrary precision, for it stops at a fixed number of digits of precision. Furthermore, due to the lack of intelligent numerical functions that allow the processing of multiple bits at a time, the dc program must perform arithmetic a digit at a time, which degrades the operational efficiency and processing speed of numerical operations.
In general, an efficient and useful infinite precision system has not been developed to date.